home *** CD-ROM | disk | FTP | other *** search
- Path: tim.xenologics.com!usenet
- From: zippo@edina.xnc.com (Peter Liebetrau)
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: asm code needed to check thecurrent processor ...
- Date: 11 Jan 1996 20:24:10 GMT
- Organization: Xenologics Networks & Communications GmbH
- Message-ID: <853.6584T814T159@edina.xnc.com>
- References: <4d1j99$fs6@rc1.vub.ac.be>
- NNTP-Posting-Host: slip-3.xenologics.com
- X-Newsreader: THOR 2.1 (Amiga;TCP/IP beta 5) *UNREGISTERED*
-
- Hi,
-
- > hi, I'm looking for some asm code to check current processor
- >(680x0) available, fpu, mmu on a Amiga.
-
- > I'f you have some routines ... could you send it to me ...
-
- in the ExecBase at the offset 296 you find AttnFlags. Here the
- Processorversion is written !
- Each bit is for one processor. If AttnFlags is 0 then it is a simple 68000
-
- Bit Processor
- 0 68010
- 1 68020
- 2 68030 also set for 68040
- 3 68040
- 4 68881 also set for 68882
- 5 68882
- 6 FPU40 Set if 68040 FPU
-
- For more information, take a look to the includes /exec/execbase.h
- or .i ?!?! :-)
-
- Some Code ....
-
- cpu_:
- dc.l 0
-
- MOVE.l 4,a0
- MOVE 296(a0),d1
- MOVEQ #0,d0
- AND #15,d1
- loop
- BEQ done
- ADDQ #1,d0
- LSR #1,d1
- BRA loop
- done
- RTS
-
- From 1 to 4, d0 now is the processornumber !
- 0 = 68000
- 1 = 68010
- [...]
- 4 = 68040
-
-
-